import { IPSAppViewMsgGroup } from './ipsapp-view-msg-group';
import { IPSAppViewMsgGroupDetail } from './ipsapp-view-msg-group-detail';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSAppViewMsgGroupImpl extends PSModelObjectImpl implements IPSAppViewMsgGroup {
  get bodyStyle(): 'LIST' | 'MARQUEE' | 'MARQUEE2' | 'USER' | 'USER2' {
    return this.M.bodyStyle;
  }

  get bottomStyle(): 'LIST' | 'MARQUEE' | 'MARQUEE2' | 'USER' | 'USER2' {
    return this.M.bottomStyle;
  }

  get codeName(): string {
    return this.M.codeName;
  }

  get dynaModelFilePath(): string {
    return this.M.dynaModelFilePath;
  }

  get memo(): string {
    return this.M.memo;
  }

  get name(): string {
    return this.M.name;
  }

  get orderValue(): number {
    return this.M.orderValue != null ? this.M.orderValue : 99999;
  }

  protected psappviewmsggroupdetails: IPSAppViewMsgGroupDetail[] | null = null;

  getPSAppViewMsgGroupDetails(): IPSAppViewMsgGroupDetail[] | null {
    if (this.psappviewmsggroupdetails == null) {
      this.psappviewmsggroupdetails = this.fillChildListModel(this.M.getPSAppViewMsgGroupDetails, 'app.view.IPSAppViewMsgGroupDetail') as IPSAppViewMsgGroupDetail[];
    }
    return this.psappviewmsggroupdetails;
  }

  get psAppViewMsgGroupDetails(): IPSAppViewMsgGroupDetail[] | null {
    return this.getPSAppViewMsgGroupDetails();
  }

  findPSAppViewMsgGroupDetail(objKey: any): IPSAppViewMsgGroupDetail | null {
    return this.getPSModel5('app.view.IPSAppViewMsgGroupDetail', this.getPSAppViewMsgGroupDetails(), objKey) as IPSAppViewMsgGroupDetail;
  }

  get topStyle(): 'LIST' | 'MARQUEE' | 'MARQUEE2' | 'USER' | 'USER2' {
    return this.M.topStyle;
  }

  get userCat(): string {
    return this.M.userCat;
  }

  get userTag(): string {
    return this.M.userTag;
  }

  get userTag2(): string {
    return this.M.userTag2;
  }

  get userTag3(): string {
    return this.M.userTag3;
  }

  get userTag4(): string {
    return this.M.userTag4;
  }

  get cls(): string {
    return 'PSAppViewMsgGroupImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'IPSModelSortable' || cls == 'app.view.IPSAppViewMsgGroup' || cls == 'view.IPSViewMsgGroup') return true;
    return super.instanceof(cls);
  }
}
